home *** CD-ROM | disk | FTP | other *** search
- %case uses%
- %case instance%
- %itemname%:% %CPopupMenu;
- %case create%
-
- New (%itemname%);
- %itemname%.IViewRes ('PopM', %paneID%, enclosure, supervisor);
- %if not labelName = %
- %itemname%.SetLabelText (%labelName%);
- %labelName%.SetFontNumber (0); {System, Chicago}
- %endif%
- %case itemNr%
- %DefineItem%
- %case dialog field%
- %fieldname%:% %integer;
- %case init field%
- %fieldname% := 1;
- %case auxiliary%
- {----------}
- var
- x%fieldname%: integer;
-
- {----------}
- Procedure Draw%Itemname% (whichDialog: DialogPtr;
- itemNr: integer);
- Begin
- DrawPopup (itemNr, %popupID%, x%fieldname%);
- End; {Draw%Itemname%}
-
- %case filter%
- %case set%
- x%Fieldname% := %Fieldname%;
- SetUserItem (%Itemname%, @Draw%Itemname%);
- %case hit%
- %itemname%: begin
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- DoPopup (%itemname%, %popupID%, %fieldname%);
- x%Fieldname% := %fieldname%;
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- end;
- %case finish%
-